package pers.flowerinsnow.minecraft.forge.fastdungeonjoiner.util

import net.minecraft.client.Minecraft

object StateUtils {
  def isInSkyBlock: Boolean ={
    val mc = Minecraft.getMinecraft
    val world = mc.theWorld
    if (world == null) return false
    val sb = world.getScoreboard
    if (sb == null) return false
    val objective = sb.getObjectiveInDisplaySlot(1)
    if (objective == null) return false
    val name = MessageUtils.removeColor(objective.getDisplayName)
    "SKYBLOCK".equals(name) || "SKYBLOCK CO-OP".equals(name)
  }
}
